
using System.Data.Entity.ModelConfiguration;

namespace OBUCare.Core.Models.Mapping
{
    public class OPERATION_CARE_LOGSMap : EntityTypeConfiguration<OPERATION_CARE_LOGS>
    {
        public OPERATION_CARE_LOGSMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.OPERATOR_NO)
                .IsRequired()
                .IsFixedLength()
                .HasMaxLength(6);

            this.Property(t => t.OBU_NO)
                .IsRequired()
                .IsFixedLength()
                .HasMaxLength(16);

            this.Property(t => t.CLIENT_IP)
                .HasMaxLength(200);


            this.Property(t => t.REMARK)
                .HasMaxLength(500);

            this.Property(t => t.USER_NO).HasMaxLength(14);

            this.Property(t => t.STATUS);

            // Table & Column Mappings
            this.ToTable("OPERATION_CARE_LOGS");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.OPERATION_KIND).HasColumnName("OPERATION_KIND");
            this.Property(t => t.POS_ID).HasColumnName("POS_ID");
            this.Property(t => t.OPERATOR_NO).HasColumnName("OPERATOR_NO");
            this.Property(t => t.OPERATION_ID).HasColumnName("OPERATION_ID");
            this.Property(t => t.OBU_NO).HasColumnName("OBU_NO");
            this.Property(t => t.AMOUNT).HasColumnName("AMOUNT");
            this.Property(t => t.USER_NO).HasColumnName("USER_NO");
            this.Property(t => t.RECORD_TIME).HasColumnName("RECORD_TIME");
            this.Property(t => t.CLIENT_IP).HasColumnName("CLIENT_IP");
            this.Property(t => t.REMARK).HasColumnName("REMARK");
            this.Property(t => t.STATUS).HasColumnName("STATUS");
        }
    }
}
